<template>
  <a-modal v-model='visible' :width='900' title='统计详情' footer='' @cancel='cancel'>
  <statistics-table ref='table1' :data-source='dataSource' :layoutY='400'></statistics-table>
  </a-modal>
</template>

<script>
import ReportsEpidemicDailyService from '@/myService/ReportsEpidemicDailyService'
import StatisticsTable from '@views/data-governance/smart-reports/epidemic-daily/components/StatisticsTable'


export default {
  name: 'StatisticsHomeModal',
  components: {
    StatisticsTable
  },
  data() {
    return {
      visible: false,
      dataSource: [],
      ds:""
    }
  },
  methods: {
    async open(ds) {
      this.ds = ds
      this.temp={}
      await this.loadDate()
      this.visible = true
    },
    cancel() {
      this.visible = false
    },
    loadDate() {
      this.loading = true
      ReportsEpidemicDailyService.getCategoryTemplateStatistics(this.ds).then(res => {
        console.log(res)
        if (res.success) {
          this.dataSource = res.result.records || res.result
        } else {
          this.$message.warning(res.message)
        }
      }).finally(() => {
        this.loading = false
      })
    },
  }
}
</script>

<style scoped lang='less'>

</style>